package com.ruoyi.user.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户对象 tb_user
 * 
 * @author wuxiao
 * @date 2024-08-19
 */
public class TbUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Long userId;

    /** 角色编号 */
    @Excel(name = "角色编号")
    private Integer roleId;

    /*验证码*/
    private String code;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    /** 头像 */
    @Excel(name = "头像")
    private String avatar;

    /** 昵称 */
    @Excel(name = "昵称")
    private String nick;

    /** 手机号(账号) */
    @Excel(name = "手机号(账号)")
    private String account;

    /** 密码 */
    @Excel(name = "密码")
    private String password;

    private String token;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    /** 注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registrationDate;

    /** 最近活跃时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近活跃时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loginDate;

    /** 个人邀请码 */
    @Excel(name = "个人邀请码")
    private String personalinviteCode;

    /** 受邀邀请码 */
    @Excel(name = "受邀邀请码")
    private String invitedbyinviteCode;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getAvatar()
    {
        return avatar;
    }
    public void setNick(String nick)
    {
        this.nick = nick;
    }

    public String getNick()
    {
        return nick;
    }
    public void setAccount(String account)
    {
        this.account = account;
    }

    public String getAccount()
    {
        return account;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }
    public void setRegistrationDate(Date registrationDate)
    {
        this.registrationDate = registrationDate;
    }

    public Date getRegistrationDate()
    {
        return registrationDate;
    }
    public void setLoginDate(Date loginDate)
    {
        this.loginDate = loginDate;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Date getLoginDate()
    {
        return loginDate;
    }
    public void setPersonalinviteCode(String personalinviteCode)
    {
        this.personalinviteCode = personalinviteCode;
    }

    public String getPersonalinviteCode()
    {
        return personalinviteCode;
    }
    public void setInvitedbyinviteCode(String invitedbyinviteCode)
    {
        this.invitedbyinviteCode = invitedbyinviteCode;
    }

    public String getInvitedbyinviteCode()
    {
        return invitedbyinviteCode;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("roleId", getRoleId())
                .append("avatar", getAvatar())
                .append("nick", getNick())
                .append("account", getAccount())
                .append("password", getPassword())
                .append("registrationDate", getRegistrationDate())
                .append("loginDate", getLoginDate())
                .append("personalinviteCode", getPersonalinviteCode())
                .append("invitedbyinviteCode", getInvitedbyinviteCode())
                .append("status", getStatus())
                .toString();
    }
}
